package com.baba.vote.dto.response;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author moxinHuoHuo
 * @create 2020/4/7 下午3:12
 */
@Data
public class VoteItemDto {

  @ApiModelProperty("数据库的id")
  private Integer id;

  @ApiModelProperty("投票的活动的id")
  private Integer voteActId;

  @ApiModelProperty("选项内容")
  private String content;

  @ApiModelProperty("选择该项的人数")
  private Integer supportNum;

  @ApiModelProperty("选择该项的人的信息")
  private List<VotePeopleDto> peoples;

  public void initSupportNum() {
    this.supportNum = peoples.size();
  }

}
